package com.taysear.domain;

import java.io.Serializable;

@SuppressWarnings("serial")
public class Time implements Serializable{

	private Integer timeId;
	private String reportingTime;
	private String departureTime;
	private String ampm;

	public Integer getTimeId() {
		return timeId;
	}
	public void setTimeId(Integer timeId) {
		this.timeId = timeId;
	}
	public String getReportingTime() {
		return reportingTime;
	}
	public void setReportingTime(String reportingTime) {
		this.reportingTime = reportingTime;
	}
	public String getDepartureTime() {
		return departureTime;
	}
	public void setDepartureTime(String departureTime) {
		this.departureTime = departureTime;
	}
	public String getAmpm() {
		return ampm;
	}
	public void setAmpm(String ampm) {
		this.ampm = ampm;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((ampm == null) ? 0 : ampm.hashCode());
		result = prime * result
				+ ((departureTime == null) ? 0 : departureTime.hashCode());
		result = prime * result
				+ ((reportingTime == null) ? 0 : reportingTime.hashCode());
		result = prime * result + ((timeId == null) ? 0 : timeId.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Time other = (Time) obj;
		if (ampm == null) {
			if (other.ampm != null)
				return false;
		} else if (!ampm.equals(other.ampm))
			return false;
		if (departureTime == null) {
			if (other.departureTime != null)
				return false;
		} else if (!departureTime.equals(other.departureTime))
			return false;
		if (reportingTime == null) {
			if (other.reportingTime != null)
				return false;
		} else if (!reportingTime.equals(other.reportingTime))
			return false;
		if (timeId == null) {
			if (other.timeId != null)
				return false;
		} else if (!timeId.equals(other.timeId))
			return false;
		return true;
	}
	
	@Override
    public String toString() {
        return departureTime +" "+ ampm;
    }
}
